import {_decorator, Component, Node, RigidBody2D, Vec2, v2} from 'cc';

const {ccclass, property} = _decorator;

@ccclass('BirdController')
export class BirdController extends Component {

    start() {

    }

    update(deltaTime: number) {

    }

    /**
     * 飞
     */
    fly() {
        // 给一个向上的力
        this.getComponent(RigidBody2D).applyForce(v2(0, 100), v2(0, 0), true);
    }
}

